//
//  LSZAudioChangeManager.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/4/12.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZAudioChangeManager.h"

@implementation LSZAudioChangeManager
-(id)initWithWithAudioChange :(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        self.arrayData = [[NSMutableArray alloc]init];
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSString class]]) {
            return self;
        }
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSNumber class]]) {
            return self;
        }
        if (![dic valueForKey:@"data"]) {
            return self;
        }
        NSArray * arrayDataDic = dic[@"data"];
        NSMutableArray * mutArrayAdd= [[NSMutableArray alloc]init];
        for (NSDictionary * dicTion in arrayDataDic) {
            LSZAudioChangeMg * mg = [[LSZAudioChangeMg alloc]init];
            mg.album = NullStringjudgment(NSStr(dicTion[@"album"]));
            mg.duration = NullStringjudgment(NSStr(dicTion[@"duration"]));
            mg.fileUrl = NullStringjudgment(NSStr(dicTion[@"fileUrl"]));
            mg.shareUrl = NullStringjudgment(NSStr(dicTion[@"shareUrl"]));
            mg.id_id = NullStringjudgment(NSStr(dicTion[@"id"]));
            mg.n = NullStringjudgment(NSStr(dicTion[@"n"]));
            mg.parentId = NullStringjudgment(NSStr(dicTion[@"parentId"]));
            mg.singerName = NullStringjudgment(NSStr(dicTion[@"singerName"]));
            mg.title = NullStringjudgment(NSStr(dicTion[@"title"]));
             mg.originalClick = NullStringjudgment(NSStr(dicTion[@"click"]));
            mg.click  = [LSZSpecialPackaging theNumberViewsForTheAlbumAhanges: mg.originalClick];
            [mutArrayAdd addObject:mg];
        }
        self.arrayData = mutArrayAdd;
    }
    return self;
}
@end
@implementation LSZAudioChangeMg
@end
